# 1. 导入FastDFS客户端扩展
from fdfs_client.client import Fdfs_client


# 2. 创建FastDFS客户端实例
client = Fdfs_client('client.conf')
# 3. 调用FastDFS客户端上传文件方法
ret = client.upload_by_filename('client.conf')
print(ret)


'''

{'Storage IP': '172.16.67.178', 'Local file name': 'client.conf',
'Uploaded size': '1.00KB', 'Group name': 'group1',
'Remote file_id': 'group1/M00/00/00/rBBDsl2KBG2EHCKAAAAAAI3LB1s36.conf',
'Status': 'Upload successed.'}


'''

ret = {
'Group name': 'Storage组名',
'Remote file_id': '文件索引，可用于下载',
'Status': '文件上传结果反馈',
'Local file name': '上传文件全路径',
'Uploaded size': '文件大小',
'Storage IP': 'Storage地址'
 }